package com.wy._05Random.randomFile.Enum;

import java.awt.*;
import java.util.Random;

/**
 * @author 吴宇~
 * @motto 我亦无他，唯手熟尔。
 * @edition jdk1.8
 * @reflection 0-1 喧闹任其喧闹，自由我自为之，我自风情万种，与世无争。
 * @date 2024/08/25/18:19
 * @target 心若有所向往，何惧道阻且长
 */
public class FontEnum {
    public static enum FontStyle{
        PLAIN("普通样式，没有加粗或斜体效果",0),
        BOLD(";粗体样式，字体加粗显示",1),
        ITALIC("斜体样式，字体倾斜显示",2),
        BOLD_ITALIC("粗体加斜体样式，字体既加粗又倾斜显示",3);
        private String name;
        private int digitalIdentification; //数字标识

        FontStyle(String name, int digitalIdentification) {
            this.name = name;
            this.digitalIdentification = digitalIdentification;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getDigitalIdentification() {
            return digitalIdentification;
        }

        public void setDigitalIdentification(int digitalIdentification) {
            this.digitalIdentification = digitalIdentification;
        }
    }
    public static int getRandomFontStyle(){
        FontStyle[] styles = FontStyle.values();
        return styles[new Random().nextInt(styles.length)].getDigitalIdentification();
    }

}
